<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>float</title>

    <style type="text/css">
        .list {
            margin: 0 auto;
            width: 650px;
            height: 600px;
            border: 1px solid red;
            list-style: none;
            padding: 0;
        }

        .list li {
            width: 100px;
            height: 100px;
            background: green;
            float: left;
            margin: 10px;
        }

        .block {
            width: 800px;
            height: 300px;
            background: #999999;
        }

        .clear {
            clear: both;
        }
    </style>
</head>
<body>
<ul class="list">
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
    <li>6</li>
    <li>7</li>
    <li>8</li>
    <div class="clear"></div>
</ul>
<div class="block"></div>
</body>
</html>